package com.sq.partner.manager.controller;

import java.util.HashMap;

import javax.annotation.Resource;

import org.apache.log4j.Logger;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Controller;

import com.sq.partner.manager.common.ActirationErrorInfo;
import com.sq.partner.manager.common.Constants;
import com.sq.partner.manager.service.ActirationCardCirculationService;
import com.sq.partner.manager.util.LogUtil;

/**
 * 激活卡 定时任务处理
 * @author zsm 2018年7月6日
 *
 */
@Controller
public class ActirationCardTimerTaskController {
	@Resource
	private ActirationCardCirculationService circulationService;
	Logger loger = LogUtil.getLog(ActirationCardTimerTaskController.class);
	/**
	 * 定时过期卡单，定时筛选已过期卡单置为作废状态
	 * @throws Exception
	 */
	@Scheduled(cron = "0 0 0 * * ?")
	public void vatSyncSchedule() throws Exception{
		return ;
		/*//准备参数
		HashMap<String,Object> map=new HashMap<String,Object>();
		//更新成的状态
		map.put("status", Constants.ACTIR_CARD_OVERDUE);
		//需要更新的状态
		map.put("delstatus", "'"+Constants.ACTIR_CARD_STOCK+"','"+Constants.ACTIR_CARD_HAND_UP+"','"+Constants.ACTIR_CARD_HAND_DOWN+"','"+Constants.ACTIR_CARD_RELATION+"','"+Constants.ACTIR_CARD_ACTIVABLE+"'");
		loger.info(ActirationErrorInfo.TIMER_TASK_1);
		//执行定时操作
		boolean update = circulationService.updateStatusForTimerTask(map);
		if(update){
			loger.info(ActirationErrorInfo.TIMER_TASK_2+update);
		}else{
			loger.info(ActirationErrorInfo.TIMER_TASK_3+update);
		}*/
	}
}
